/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SQL;

import java.sql.*;

/**
 *
 * @author Luis Olave 10
 */
public class Conexion 
{
    public static Connection getConexion() 
    {
        Connection conexion = null;

        try {
            String driverClass = "com.mysql.jdbc.Driver";
            String driverURL = "jdbc:mysql://localhost/garantias";
            Class.forName(driverClass);
            //cambiar pass al subir 1234
            conexion = DriverManager.getConnection(driverURL, "root", "1234");
        } catch (Exception z) {
            javax.swing.JOptionPane.showMessageDialog(null, "Problemas en la Conexion de la Base de Datos");
        }
        return conexion;
    }
}
